package cn.darkhorse.mesmeter.pojo;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 毛冠军
 * @since 2023/8/30 17:26
 */
public class MeterTreeItem {
    private Long id;
    private Long parentId;
    private String label;
    /**
     * 是否电表
     */
    private boolean isMeter;
    private String tableName;
    private List<MeterTreeItem> children = new ArrayList<>();

    public MeterTreeItem(Long id, Long parentId, String label) {
        this.id = id;
        this.parentId = parentId;
        this.label = label;
        this.isMeter=false;
    }

    public MeterTreeItem(Long id, Long parentId, String label, boolean isMeter, String tableName) {
        this.id = id;
        this.parentId = parentId;
        this.label = label;
        this.isMeter=isMeter;
        this.tableName=tableName;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public List<MeterTreeItem> getChildren() {
        return children;
    }

    public void setChildren(List<MeterTreeItem> children) {
        this.children = children;
    }

    public boolean isMeter() {
        return isMeter;
    }

    public void setMeter(boolean meter) {
        isMeter = meter;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }
}
